package com.library.admin.manager;

import com.library.admin.listener.FindRentBySubscriberListener;
import com.vaadin.ui.Button;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;

public class RentManagerPanel extends VerticalLayout {
	private static final long serialVersionUID = 1L;
	
	private TextField subscriberLogin;
	private Button submitButton;

	public RentManagerPanel() {
		init();
	}

	public void init() {
		setSpacing(true);
		setMargin(true, false, false, false);
		subscriberLogin = new TextField("Veuillez saisir le login de l'abonné pour consulter ses locations");
		submitButton = new Button("OK");
		
		submitButton.addListener(new FindRentBySubscriberListener(this));
		
		addComponent(subscriberLogin);
		addComponent(submitButton);
	}

	public TextField getSubscriberLogin() {
		return subscriberLogin;
	}
}
